class SelfNode {
    val:string;
    left:SelfNode | null;
    right:SelfNode | null;

    constructor(val:string,left:SelfNode,right:SelfNode){
        this.val = val
        this.left = left
        this.right = right
    }
    setLeft(node: TreeNode): void {
        this.left = node
    }
    setRight(node: TreeNode): void {
        this.right = node
    }
}

function preRecusion(root:SelfNode) {
    if(!root){
        return;
    }
    console.log(root.val);
    preRecusion(root.left);
    preRecusion(root.right)
}
function inRecusion(root:SelfNode) {
    if(!root){
        return;
    }
    inRecusion(root.left);
    console.log(root.val);
    inRecusion(root.right)
}
function postRecusion(root:SelfNode) {
    if(!root){
        return;
    }
    postRecusion(root.left);
    postRecusion(root.right)
    console.log(root.val);
}


function recusion(level, params1,params2) {
    if(level > MAX_LEVEL){
        return;
    }

    process();

    recusion(level+1);

    // 清除数据
    
}